package main

import (
	"fmt"
)


func main(){
	slice := make([]int,5)
	fmt.Println(slice)
	//追加元素
	slice = append(slice,1)
	fmt.Println(slice)
	//nil
	var numbers []int

	printSlice(numbers)
 
	if(numbers == nil){
	   fmt.Println("切片是空的")
	}

	//截取切片，前闭后开
	fmt.Println(slice[:3])


}

func printSlice(x []int){
	fmt.Printf("len=%d cap=%d slice=%v\n",len(x),cap(x),x)
}


func mapop(){
	
}


